// Copyright (C) 1953-2022 NUDT
// Verilog module name - mbus_parse_and_encapsulate_osc 
// Version: V4.1.0.20221206
// Created:
// Created:
//         by - fenglin 
////////////////////////////////////////////////////////////////////////////
// Description:
//         
///////////////////////////////////////////////////////////////////////////

`timescale 1ns / 1ps

module mbus_parse_and_encapsulate_osc
#(
  parameter osc_ver   = 8'h41,
  parameter osm_ver   = 8'h41
)
(
        i_clk                            ,    
        i_rst_n                          ,
					 
        i_wr                             ,
        iv_wdata                         ,
        iv_addr                          ,
        i_rd                             ,
        o_wr                             ,
        ov_rdata                         ,
        ov_raddr                         ,
		
        iv_sync_clk                      ,		
        ov_os_cid                        ,
        o_gm_role                        ,
        o_sync_step_mode                 ,
        ov_sync_period                   ,
        ov_offset_threshold              ,
        iv_sync_state                    ,
        ov_frequency_cor                 ,
        o_frequency_cor_wr               ,
        o_state_report_enabled           ,
        ov_port_ptp_enabled	             ,
        ov_measure_period                ,
        ov_measure_responder_wait_time   ,
        ov_master_port                   ,
        ov_cumulativescaledrateoffset    ,
		
		iv_measure_req_cnt_p0            ,
		iv_measure_resp_cnt_p0           ,
		iv_measure_req_cnt_p1            ,
		iv_measure_resp_cnt_p1           ,
		iv_measure_req_cnt_p2            ,
		iv_measure_resp_cnt_p2           ,
		iv_measure_req_cnt_p3            ,
		iv_measure_resp_cnt_p3           ,
		iv_measure_req_cnt_p4            ,
		iv_measure_resp_cnt_p4           ,
		iv_measure_req_cnt_p5            ,
		iv_measure_resp_cnt_p5           ,
		iv_measure_req_cnt_p6            ,
		iv_measure_resp_cnt_p6           ,
		iv_measure_req_cnt_p7            ,
		iv_measure_resp_cnt_p7           ,
		iv_measure_req_cnt_p8            ,
		iv_measure_resp_cnt_p8           ,
		iv_measure_req_cnt_p9            ,
		iv_measure_resp_cnt_p9           ,
		iv_measure_req_cnt_p10           ,
		iv_measure_resp_cnt_p10          ,
		iv_measure_req_cnt_p11           ,
		iv_measure_resp_cnt_p11          ,
		iv_measure_req_cnt_p12           ,
		iv_measure_resp_cnt_p12          ,
		iv_measure_req_cnt_p13           ,
		iv_measure_resp_cnt_p13          ,
		iv_measure_req_cnt_p14           ,
		iv_measure_resp_cnt_p14          ,
		iv_measure_req_cnt_p15           ,
		iv_measure_resp_cnt_p15          ,
		iv_measure_req_cnt_p16           ,
		iv_measure_resp_cnt_p16          ,
		iv_measure_req_cnt_p17           ,
		iv_measure_resp_cnt_p17          ,
		iv_measure_req_cnt_p18           ,
		iv_measure_resp_cnt_p18          ,
		iv_measure_req_cnt_p19           ,
		iv_measure_resp_cnt_p19          ,
		iv_measure_req_cnt_p20           ,
		iv_measure_resp_cnt_p20          ,
		iv_measure_req_cnt_p21           ,
		iv_measure_resp_cnt_p21          ,
		iv_measure_req_cnt_p22           ,
		iv_measure_resp_cnt_p22          ,
		iv_measure_req_cnt_p23           ,
		iv_measure_resp_cnt_p23          ,
		iv_measure_req_cnt_p24           ,
		iv_measure_resp_cnt_p24          ,
		iv_measure_req_cnt_p25           ,
		iv_measure_resp_cnt_p25          ,
		iv_measure_req_cnt_p26           ,
		iv_measure_resp_cnt_p26          ,
		iv_measure_req_cnt_p27           ,
		iv_measure_resp_cnt_p27          ,
		iv_measure_req_cnt_p28           ,
		iv_measure_resp_cnt_p28          ,
		iv_measure_req_cnt_p29           ,
		iv_measure_resp_cnt_p29          ,
		iv_measure_req_cnt_p30           ,
		iv_measure_resp_cnt_p30          ,
		iv_measure_req_cnt_p31           ,
		iv_measure_resp_cnt_p31          
);
// I/O
// i_clk & rst
input                  i_clk                         ;
input                  i_rst_n                       ;

input                  i_wr                          ;
input      [31:0]      iv_wdata                      ;
input      [18:0]      iv_addr                       ;       
input                  i_rd                          ;
output reg             o_wr                          ; 
output reg [31:0]      ov_rdata                      ;  
output reg [18:0]      ov_raddr                      ;

input      [79:0]      iv_sync_clk                   ;
output reg [11:0]      ov_os_cid                     ;
output reg             o_gm_role                     ; 
output reg             o_sync_step_mode              ;
output reg [3:0]       ov_sync_period                ;
output reg [11:0]      ov_offset_threshold           ;
input      [16:0]      iv_sync_state                 ;
output reg [48:0]      ov_frequency_cor              ;
output reg             o_frequency_cor_wr            ;
output reg             o_state_report_enabled        ;
output reg [31:0]      ov_port_ptp_enabled	         ;
output reg [3:0]       ov_measure_period             ;
output reg [2:0]       ov_measure_responder_wait_time;
output reg [31:0]      ov_master_port                ;
output reg [31:0]      ov_cumulativescaledrateoffset ;
input      [15:0]      iv_measure_req_cnt_p0         ;
input      [15:0]      iv_measure_resp_cnt_p0        ;
input      [15:0]      iv_measure_req_cnt_p1         ;
input      [15:0]      iv_measure_resp_cnt_p1        ;
input      [15:0]      iv_measure_req_cnt_p2         ;
input      [15:0]      iv_measure_resp_cnt_p2        ;
input      [15:0]      iv_measure_req_cnt_p3         ;
input      [15:0]      iv_measure_resp_cnt_p3        ;
input      [15:0]      iv_measure_req_cnt_p4         ;
input      [15:0]      iv_measure_resp_cnt_p4        ;
input      [15:0]      iv_measure_req_cnt_p5         ;
input      [15:0]      iv_measure_resp_cnt_p5        ;
input      [15:0]      iv_measure_req_cnt_p6         ;
input      [15:0]      iv_measure_resp_cnt_p6        ;
input      [15:0]      iv_measure_req_cnt_p7         ;
input      [15:0]      iv_measure_resp_cnt_p7        ;
input      [15:0]      iv_measure_req_cnt_p8         ;
input      [15:0]      iv_measure_resp_cnt_p8        ;
input      [15:0]      iv_measure_req_cnt_p9         ;
input      [15:0]      iv_measure_resp_cnt_p9        ;
input      [15:0]      iv_measure_req_cnt_p10         ;
input      [15:0]      iv_measure_resp_cnt_p10        ;
input      [15:0]      iv_measure_req_cnt_p11         ;
input      [15:0]      iv_measure_resp_cnt_p11        ;
input      [15:0]      iv_measure_req_cnt_p12         ;
input      [15:0]      iv_measure_resp_cnt_p12        ;
input      [15:0]      iv_measure_req_cnt_p13         ;
input      [15:0]      iv_measure_resp_cnt_p13        ;
input      [15:0]      iv_measure_req_cnt_p14         ;
input      [15:0]      iv_measure_resp_cnt_p14        ;
input      [15:0]      iv_measure_req_cnt_p15         ;
input      [15:0]      iv_measure_resp_cnt_p15        ;
input      [15:0]      iv_measure_req_cnt_p16         ;
input      [15:0]      iv_measure_resp_cnt_p16        ;
input      [15:0]      iv_measure_req_cnt_p17         ;
input      [15:0]      iv_measure_resp_cnt_p17        ;
input      [15:0]      iv_measure_req_cnt_p18         ;
input      [15:0]      iv_measure_resp_cnt_p18        ;
input      [15:0]      iv_measure_req_cnt_p19         ;
input      [15:0]      iv_measure_resp_cnt_p19        ;
input      [15:0]      iv_measure_req_cnt_p20         ;
input      [15:0]      iv_measure_resp_cnt_p20        ;
input      [15:0]      iv_measure_req_cnt_p21         ;
input      [15:0]      iv_measure_resp_cnt_p21        ;
input      [15:0]      iv_measure_req_cnt_p22         ;
input      [15:0]      iv_measure_resp_cnt_p22        ;
input      [15:0]      iv_measure_req_cnt_p23         ;
input      [15:0]      iv_measure_resp_cnt_p23        ;
input      [15:0]      iv_measure_req_cnt_p24         ;
input      [15:0]      iv_measure_resp_cnt_p24        ;
input      [15:0]      iv_measure_req_cnt_p25         ;
input      [15:0]      iv_measure_resp_cnt_p25        ;
input      [15:0]      iv_measure_req_cnt_p26         ;
input      [15:0]      iv_measure_resp_cnt_p26        ;
input      [15:0]      iv_measure_req_cnt_p27         ;
input      [15:0]      iv_measure_resp_cnt_p27        ;
input      [15:0]      iv_measure_req_cnt_p28         ;
input      [15:0]      iv_measure_resp_cnt_p28        ;
input      [15:0]      iv_measure_req_cnt_p29         ;
input      [15:0]      iv_measure_resp_cnt_p29        ;
input      [15:0]      iv_measure_req_cnt_p30         ;
input      [15:0]      iv_measure_resp_cnt_p30        ;
input      [15:0]      iv_measure_req_cnt_p31         ;
input      [15:0]      iv_measure_resp_cnt_p31        ;
//***************************************************
//               command parse
//***************************************************
reg        [79:0]      rv_sync_clk;
always @(posedge i_clk or negedge i_rst_n) begin
    if(i_rst_n == 1'b0)begin       
        o_wr              <= 1'b0 ;
        ov_rdata          <= 32'b0;
        ov_raddr          <= 19'b0;
        
		rv_sync_clk                    <= 80'b0;
        ov_os_cid                      <= 12'b0;
        o_gm_role                      <= 1'b0;
        o_sync_step_mode               <= 1'b0;//two_step
        ov_sync_period                 <= 4'd7;//2^7ms.
        ov_offset_threshold            <= 12'd200 ;  //200ns.  
        ov_frequency_cor               <= {8'h8,41'h0};      
        o_frequency_cor_wr             <= 1'b0 ; 
        o_state_report_enabled         <= 1'b0;
        ov_port_ptp_enabled	           <= 32'b0;
        ov_measure_period              <= 4'd10;//2^10ms.
        ov_measure_responder_wait_time <= 3'd4;//2^4ms.
        ov_master_port                 <= 32'b0;
        ov_cumulativescaledrateoffset  <= 32'b0;		
    end
    else begin
        if(i_wr)begin
            o_wr          <= 1'b0;
            ov_rdata      <= 32'b0;
            ov_raddr      <= 19'b0;		
            if(iv_addr == 19'd1)begin
                ov_os_cid          <= iv_wdata[11:0];
                o_frequency_cor_wr <= 1'b0; 				
            end
            else if(iv_addr == 19'd2)begin
                o_gm_role          <= iv_wdata[0];
				o_frequency_cor_wr <= 1'b0; 
            end
            else if(iv_addr == 19'd3)begin
                ov_sync_period     <= iv_wdata[3:0]; 
                o_frequency_cor_wr <= 1'b0; 				
            end
            else if(iv_addr == 19'd4)begin
                ov_offset_threshold   <= iv_wdata[11:0]; 
                o_frequency_cor_wr    <= 1'b0; 				
            end
            //else if(iv_addr == 19'd5)begin//    iv_sync_state 
            //			
            //end
            else if(iv_addr == 19'd6)begin
                ov_frequency_cor[48:32] <= iv_wdata[16:0];      
                o_frequency_cor_wr      <= 1'b0;                
            end
            else if(iv_addr == 19'd7)begin
                ov_frequency_cor[31:0]  <= iv_wdata[31:0];      
                o_frequency_cor_wr      <= 1'b1;          
            end  
            else if(iv_addr == 19'd8)begin
                o_state_report_enabled <= iv_wdata[0];
                o_frequency_cor_wr     <= 1'b0;                 
            end  
            else if(iv_addr == 19'd9)begin
                ov_port_ptp_enabled     <= iv_wdata;
                o_frequency_cor_wr      <= 1'b0; 				
            end
            else if(iv_addr == 19'd10)begin
                ov_measure_period       <= iv_wdata[3:0];
                o_frequency_cor_wr      <= 1'b0; 				
            end  
            else if(iv_addr == 19'd11)begin
                ov_measure_responder_wait_time <= iv_wdata[2:0]; 
                o_frequency_cor_wr <= 1'b0; 				
            end
            else if(iv_addr == 19'd12)begin
                ov_master_port          <= iv_wdata[31:0]; 
                o_frequency_cor_wr      <= 1'b0; 				
            end
            else if(iv_addr == 19'd13)begin
                ov_cumulativescaledrateoffset <= iv_wdata[31:0];
                o_frequency_cor_wr            <= 1'b0; 				
            end
            else if(iv_addr == 19'd81)begin
                o_sync_step_mode              <= iv_wdata[0]; 	            
                o_frequency_cor_wr            <= 1'b0; 			
            end              
            else begin
                o_frequency_cor_wr            <= 1'b0; 
            end
        end      
        else if(i_rd)begin
            o_frequency_cor_wr              <= 1'b0; 
			if(iv_addr == 19'd0)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {16'b0,osc_ver,osm_ver} ;
                ov_raddr      <= iv_addr;        
            end
            else if(iv_addr == 19'd1)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {20'b0,ov_os_cid};
                ov_raddr      <= iv_addr;        
            end
            else if(iv_addr == 19'd2)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {31'b0,o_gm_role};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd3)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {28'b0,ov_sync_period};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd4)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {20'b0,ov_offset_threshold};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd5)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {15'b0,iv_sync_state};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd6)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {15'b0,ov_frequency_cor[48:32]};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd7)begin
                o_wr          <= 1'b1;
                ov_rdata      <= ov_frequency_cor[31:0];
                ov_raddr      <= iv_addr;
            end 
            else if(iv_addr == 19'd8)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {31'b0,o_state_report_enabled};
                ov_raddr      <= iv_addr;
            end     
            else if(iv_addr == 19'd9)begin
                o_wr          <= 1'b1;
                ov_rdata      <= ov_port_ptp_enabled;
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd10)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {28'b0,ov_measure_period};
                ov_raddr      <= iv_addr;
            end     
            else if(iv_addr == 19'd11)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {29'b0,ov_measure_responder_wait_time};
                ov_raddr      <= iv_addr;
            end 
            else if(iv_addr == 19'd12)begin
                o_wr          <= 1'b1;
                ov_rdata      <= ov_master_port;
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd13)begin
                o_wr          <= 1'b1;
                ov_rdata      <= ov_cumulativescaledrateoffset;
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd14)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {16'b0,iv_sync_clk[79:64]};
                ov_raddr      <= iv_addr;
				
				rv_sync_clk   <= iv_sync_clk;
            end
            else if(iv_addr == 19'd15)begin
                o_wr          <= 1'b1;
                ov_rdata      <= rv_sync_clk[63:32];
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd16)begin
                o_wr          <= 1'b1;
                ov_rdata      <= rv_sync_clk[31:0];
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd17)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p0,iv_measure_req_cnt_p0};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd18)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p1,iv_measure_req_cnt_p1};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd19)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p2,iv_measure_req_cnt_p2};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd20)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p3,iv_measure_req_cnt_p3};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd21)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p4,iv_measure_req_cnt_p4};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd22)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p5,iv_measure_req_cnt_p5};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd23)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p6,iv_measure_req_cnt_p6};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd24)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p7,iv_measure_req_cnt_p7};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd25)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p8,iv_measure_req_cnt_p8};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd26)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p9,iv_measure_req_cnt_p9};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd27)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p10,iv_measure_req_cnt_p10};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd28)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p11,iv_measure_req_cnt_p11};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd29)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p12,iv_measure_req_cnt_p12};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd30)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p13,iv_measure_req_cnt_p13};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd31)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p14,iv_measure_req_cnt_p14};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd32)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p15,iv_measure_req_cnt_p15};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd33)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p16,iv_measure_req_cnt_p16};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd34)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p17,iv_measure_req_cnt_p17};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd35)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p18,iv_measure_req_cnt_p18};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd36)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p19,iv_measure_req_cnt_p19};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd37)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p20,iv_measure_req_cnt_p20};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd38)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p21,iv_measure_req_cnt_p21};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd39)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p22,iv_measure_req_cnt_p22};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd40)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p23,iv_measure_req_cnt_p23};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd41)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p24,iv_measure_req_cnt_p24};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd42)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p25,iv_measure_req_cnt_p25};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd43)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p26,iv_measure_req_cnt_p26};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd44)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p27,iv_measure_req_cnt_p27};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd45)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p28,iv_measure_req_cnt_p28};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd46)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p29,iv_measure_req_cnt_p29};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd47)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p30,iv_measure_req_cnt_p30};
                ov_raddr      <= iv_addr;
            end	
            else if(iv_addr == 19'd48)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {iv_measure_resp_cnt_p31,iv_measure_req_cnt_p31};
                ov_raddr      <= iv_addr;
            end
            else if(iv_addr == 19'd81)begin
                o_wr          <= 1'b1;
                ov_rdata      <= {31'b0,o_sync_step_mode};
                ov_raddr      <= iv_addr;
            end           
            else begin
                o_wr          <= 1'b0;
                ov_rdata      <= 32'b0;
                ov_raddr      <= 19'b0;
            end            
        end
        else begin
            o_frequency_cor_wr          <= 1'b0;  
                
            o_wr                        <= 1'b0;
            ov_rdata                    <= 32'b0;
            ov_raddr                    <= 19'b0;        
        end
    end
end    
endmodule
    